import { createRouter, createWebHistory } from 'vue-router'
import login from '../views/Login.vue'
import postmessage from '../views/PostMessage.vue'
import messages from '../views/Messages.vue'
import myMessage from '@/views/MyMessage.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 登录页面
    {
      path: '/',
      component: login
    },
    {
      path: '/PostMessage',
      component: postmessage
    },
    {
      path: '/Message',
      component: messages
    },
    {
      path: '/JudgePost',
      component: () => import('../views//JudgePost.vue')
    },
    {
      path: '/MyMessage',
      component: myMessage
    }
  ]
})

export default router
